# print(a=10) 无法被打印，因为python解释器会认为a是参数，而参数的赋值操作被省略了
# print((a=10)) 依旧无法被打印
# import random
#
# arr = [0 for _ in range(6)]
# for i in range(100000):
#     arr[random.randint(0, 5)] += 1
#
# print(arr)
# arr = [0] * 6
# print(arr)
# arr = [1, 2, 3, 1, 4, 5, 6, 7, 1, 8, 9, 10]
# arr.remove(1)
# print(arr)

# import random
#
# red_balls = [i for i in range(1, 34)]
# blue_balls = [i for i in range(1, 17)]
# # 从红色球列表中随机抽出6个红色球（无放回抽样）
# selected_balls = random.sample(red_balls, 6)
# # 对选中的红色球排序
# selected_balls.sort()
# # 输出选中的红色球
# for ball in selected_balls:
#     print(f'\033[031m{ball:0>2d}\033[0m', end=' ')
# # 从蓝色球列表中随机抽出1个蓝色球
# blue_ball = random.choice(blue_balls)
# # 输出选中的蓝色球
# print(f'\033[034m{blue_ball:0>2d}\033[0m')

# def primes():
#     yield 2
#     it = _odd_iter()  # 初始序列
#     while True:
#         n = next(it)  # 返回序列的第一个数
#         yield n
#         it = filter(_not_divisible(n), it)  # 构造新序列

# poker
# from enum import Enum
#
#
# class Suite(Enum):
#     """花色(枚举)"""
#     SPADE, HEART, CLUB, DIAMOND = range(4)
#
#
# class Card:
#     """牌"""
#
#     def __init__(self, suite, face):
#         self.suite = suite
#         self.face = face
#
#     def __repr__(self):
#         suites = '♠♥♣♦'
#         faces = ['', 'A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']
#         return f'{suites[self.suite.value]}{faces[self.face]}'  # 返回牌的花色和点数
#
#     def __lt__(self, other):
#         if self.suite == other.suite:
#             return self.face < other.face  # 花色相同比较点数的大小
#         return self.suite.value < other.suite.value  # 花色不同比较花色对应的值
#
#
# # card1 = Card(Suite.SPADE, 5)
# # card2 = Card(Suite.HEART, 13)
# # print(card1)  # ♠5
# # print(card2)  # ♥K
#
# import random
#
#
# class Poker:
#     """扑克"""
#
#     def __init__(self):
#         self.cards = [Card(suite, face)
#                       for suite in Suite
#                       for face in range(1, 14)]  # 52张牌构成的列表
#         self.current = 0  # 记录发牌位置的属性
#
#     def shuffle(self):
#         """洗牌"""
#         self.current = 0
#         random.shuffle(self.cards)  # 通过random模块的shuffle函数实现随机乱序
#
#     def partial_shuffle(self):
#         """部分洗牌，从指定位置开始洗牌"""
#         if self.current >= len(self.cards):
#             self.shuffle()
#         temp = self.cards[self.current + 1:]
#         random.shuffle(temp)
#         self.cards[self.current + 1:] = temp
#
#     def deal(self):
#         """发牌"""
#         card = self.cards[self.current]
#         self.current += 1
#         return card
#
#     @property
#     def has_next(self):
#         """还有没有牌可以发"""
#         return self.current < len(self.cards)
#
#
# # poker = Poker()
# # print(poker.cards)
# # poker.shuffle()
# # print(poker.cards)
# # poker.current = 10
# # poker.partial_shuffle()
# # print(poker.cards)
#
# class Player:
#     """玩家"""
#
#     def __init__(self, name):
#         self.name = name
#         self.cards = []  # 玩家手上的牌
#
#     def get_one(self, card):
#         """摸牌"""
#         self.cards.append(card)
#
#     def arrange(self):
#         """整理手上的牌"""
#         self.cards.sort()
#
#
# poker = Poker()
# poker.shuffle()
# players = [Player('东邪'), Player('西毒'), Player('南帝'), Player('北丐')]
# # 将牌轮流发到每个玩家手上每人13张牌
# for _ in range(13):
#     for player in players:
#         player.get_one(poker.deal())
# # 玩家整理手上的牌输出名字和手牌
# for player in players:
#     player.arrange()
#     print(f'{player.name}: ', end='')
#     print(player.cards)


# def calc_avg():
#     """流式计算平均值"""
#     total, counter = 0, 0
#     avg_value = None
#     while True:
#         value = yield avg_value
#         total, counter = total + value, counter + 1
#         avg_value = total / counter
#
#
# gen = calc_avg()
# next(gen)
# print(gen.send(10))
# print(gen.send(20))
# print(gen.send(30))
# def removeElement(self, nums: list[int], val: int) -> int:
#     fast = len(nums) - 1
#     slow = fast
#     while fast >= 0:
#         if nums[fast] == val:
#             nums[fast], nums[slow] = nums[slow], nums[fast]
#             slow -= 1
#         fast -= 1
#     return slow + 1

# def countGoodTriplets(self, arr: list[int], a: int, b: int, c: int) -> int:
#     n = len(arr)
#     ret = 0
#     for i in range(n):
#         for j in range(i + 1, n):
#             for k in range(j + 1, n):
#                 if (abs(arr[i] - arr[j]) <= a and
#                         abs(arr[j] - arr[k]) <= b and
#                         abs(arr[i] - arr[k]) <= c):
#                     ret += 1
#     return ret

# class Solution:
#     def shuffle(self, nums: list[int], n: int) -> list[int]:
#         ret = list()
#         for i in range(n):
#             ret.append(nums[i])
#             ret.append(nums[i + n])
#         return ret
# def transpose(self, matrix: list[list[int]]) -> list[list[int]]:
#     row, col = len(matrix), len(matrix[1])
#     for i in range(row):
#         for j in range(col):
#             matrix[i][j], matrix[j][i] = matrix[j][i], matrix[i][j]
#     return matrix

# list1 = [[1, 2, 3], [4, 5, 6]]
# m, n = len(list1), len(list1[0])
# list2 = [[0] * m for _ in range(n)]
# for i in range(m):
#     for j in range(n):
#         list2[i][j] = list1[i][j]
# print(list2)
# import re
#
# s = 'u'
# print(s.startswith(('a', 'e', 'i', 'o', 'u')))
# print(s.endswith(('a', 'e', 'i', 'o', 'u')))
#
#
# def check_vowel_start_end(text):
#     pattern = r'^[aeiouAEIOU]([aeiouAEIOU]|[a-zA-Z]*[aeiouAEIOU])?$'
#     return bool(re.match(pattern, text))
#
#
# print(check_vowel_start_end(s))

print(16 // 10)
# [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] left = 0 right = 9 mid = 4
# left = 0 right = 1 mid = 0

# arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# for i in range(1, 1):
#     print(i)

# test some ssh
# ssh -i ~/.ssh/id_rsa root@192.168.1.1